package com.ybwh.springboot2.controller;

import com.ybwh.springboot2.common.RespData;
import com.ybwh.springboot2.common.encrypt.req.ReqSecretBody;
import com.ybwh.springboot2.common.encrypt.resp.RespSecretBody;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/")
public class DemoController {
    @PostMapping("secretBody")
    @ReqSecretBody
    @RespSecretBody
    public RespData<String> secretBody(@RequestBody UserEntity userEntity) {
        log.info("{}", userEntity);
        return RespData.successResp();
    }
}